#调用sys命令，实现单行覆盖输出

import sys
import time

for i in range(100):
    #percent = 1.0 * i / 1000 * 100
    sys.stdout.write("\r nihao: %d / %d" %(i+1, 100))
    sys.stdout.flush()

    time.sleep(0.1)